<style>
    .card-time{
        border-color:#c1c1c1;
        border-radius: 5px;
    }
</style>

<div class="page-home row-content am-cf">
    <?php $userInfo=\think\Session::get('yoshop_adminuser');?>
    <div class="row am-g doc-am-g">
        <div class="am-u-sm-6 am-u-md-6 am-u-lg-6 am-margin-bottom">

            <div class="widget am-cf">
                <div class="widget-head">
                    <div class="widget-title">常规数据统计</div>
                </div>
                <div class="widget-body am-cf">

                        <div class="am-u-sm-12 am-u-md-6 am-u-lg-3" style="float:left">
                            <div class="widget-card card__red am-cf">
                                <div class="card-header">下级人员总数</div>
                                <div class="card-body">
                                    <div class="card-value"><?=$data['widget-card']['service_oem'] ?></div>
                                    <span class="card-icon iconfont icon-user"></span>
                                </div>
                            </div>
                        </div>
                        <div class="am-u-sm-12 am-u-md-6 am-u-lg-3" style="float:left">
                            <div class="widget-card card__red am-cf">
                                <div class="card-header">客户总数</div>
                                <div class="card-body">
                                    <div class="card-value"><?=$data['widget-card']['service_user'] ?></div>
                                    <span class="card-icon iconfont icon-user"></span>
                                </div>
                            </div>
                        </div>

                </div>
            </div>
        </div>
    </div>
    <!-- 近七日交易走势 -->
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12 am-margin-bottom">
            <div class="widget am-cf">
                <div class="widget-head">
                    <div class="widget-title">近七日录客走势</div>
                </div>
                <div class="widget-body am-cf">
                    <div id="main" style="width: 1500px;height: 600px;"></div>
                </div>
            </div>
        </div>
    </div>

</div>
<script src="assets/common/js/echarts.min.js"></script>
<script src="assets/common/js/echarts-walden.js"></script>

<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById("main"));
    // 指定图表的配置项和数据
    var option = {
        // 标题
        title: {
            text:  "<?=$data['widget-echarts']['companyName']?>",
            subtext:'录客情况',
            left:'left',
            borderColor:'red',
            borderWidth:0
        },
        // 工具箱
        toolbox: {
            show: true,
            feature:{
                saveAsImage:{
                    show:true
                },
                restore:{
                    show:true
                },
                dataView:{
                    show:true
                },
                dataZoom:{
                    show:true
                },
                magicType:{
                    type:['line','bar']
                }

            }
        },
        tooltip:{
            trigger:'axis'
        },
        // 图例
        legend: {
            data: ['客户数量']
        },
        // x轴
        xAxis: {
            data: <?=$data['widget-echarts']['date']?>
        },
        yAxis: {},
        // 数据
        series: [{
            name: '客户数量',
            type: 'bar',
            data: <?=$data['widget-echarts']['order_total']?>,
            markPoint:{
                data:[
                    {type:'max',name:'最大值'},
                    {type:'min',name:'最小值',symbol:'arrow'}
                ]
            },
            markLine:{
                data:[
                    {type: 'average',name:'平均值'}
                ]
            }
        }
        ]
    };

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);

</script>

